package com.jd.oneday.month3;

/**
 * @author liulonghui11
 * 测试
 */

public class Day11_Test {

    public static void main(String[] args) {

        LinkedListNode linkedListNodes1 = new LinkedListNode(1, "刘伟超", 5);
        LinkedListNode linkedListNodes2 = new LinkedListNode(5, "刘广超", 4);
        LinkedListNode linkedListNodes3 = new LinkedListNode(8, "刘满超", 14);
        LinkedListNode linkedListNodes4 = new LinkedListNode(15, "刘宇鹏", 7);

        Day10_LinkedListReverse head = new Day10_LinkedListReverse();
        head.add(linkedListNodes1);
        head.add(linkedListNodes2);
        head.add(linkedListNodes3);
        head.add(linkedListNodes4);


        LinkedListNode linkedListNodes5 = new LinkedListNode(3, "刘伟超超", 5);
        LinkedListNode linkedListNodes6 = new LinkedListNode(7, "刘广超超", 4);
        LinkedListNode linkedListNodes7 = new LinkedListNode(13, "刘满超超", 14);
        LinkedListNode linkedListNodes8 = new LinkedListNode(25, "刘宇鹏鹏", 7);

        Day10_LinkedListReverse head1 = new Day10_LinkedListReverse();
        head1.add(linkedListNodes5);
        head1.add(linkedListNodes6);
        head1.add(linkedListNodes7);

        head1.add(linkedListNodes8);

        System.out.println("合并前单链表1：");

        head.List();
        System.out.println();
        System.out.println("合并前单链表2：");
        head1.List();

        System.out.println("合并后：");
        LinkedListNode list = head.MergeLinkedList(head.getNode(), head1.getNode());
        head.List1(list);

    }
}
